#include <iostream>
#include <cstring>
#include <string>

using namespace std;

typedef long long int64;

int	main()
{
	int T;
	cin >> T;
	while (T--)
	{
		string st;
		cin >> st;
		for (int i = 0; i < st.size(); ++i) if (st[i] == '\\') st[i] = '/';
		if (st[0] == '/')
		{
			puts("It's a path in Unix-like systems!");
			puts(st.c_str());
			continue;
		}
		char temp[1000];
		strcpy(temp, st.c_str());
		char* k = strstr(temp, "://");
		for (int i = 0; i < k - temp; ++i)
		{
			if (temp[i] >= 'a' && temp[i] <= 'z') continue;
			if (temp[i] >= 'A' && temp[i] <= 'Z') continue;
			k = temp - 1;
		}
		if (k > temp)
		{
			puts("It's a URL!");
			puts(st.c_str());
		} else
		{
			for (int i = 0; i < st.size(); ++i) if (st[i] == '/') st[i] = '\\';
			puts("It's a path in Windows system!");
			puts(st.c_str());
		}
	}
	return 0;
}